Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable gcov support for codecov/codecov-action #6944

Merged
merged 3 commits into from
Feb 14, 2023

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Feb 11, 2023

I noticed we're missing code coverage for the C files on Codecov.

For example, no C files listed at:

image

https://app.codecov.io/gh/python-pillow/Pillow/tree/main/src

Looks like this happened when switched bumped some workflows from v1 of the Codecov Action to v3, and others from the Codecov Bash Uploader to the v3 Action in #6281, and coverage increased, because there's better average coverage on the Python files (https://app.codecov.io/gh/python-pillow/Pillow/commit/53b6e5f4bf9a6a68e29109c457b12d17761d0035):

image

Now I remember I had earlier opened codecov/codecov-action#566, where the v1->v2 upgrade lost C coverage. (Codecov never replied.)

Anyway, by now, the Bash Uploader has been retired (https://github.com/codecov/codecov-bash) and there's a new Uploader (https://github.com/codecov/uploader).

Better yet, the Codecov Action has added support for gcov (used for C coverage) in v3 (codecov/codecov-action#688).

I tried enabling it for all workflows, but for some reason it only worked for the Docker one, so let's enable it there at least to get us back on track. The others will need more investigation.

@hugovk hugovk added the Testing label Feb 11, 2023
@nulano
Copy link
Contributor

nulano commented Feb 12, 2023

I've created hugovk#94 to also upload C coverage for Ubuntu/macOS by removing the file: ./coverage.xml filter.

I have found that the MSYS2 does generate gcov files but the upload action is not detecting them even when removing the filter.

Cygwin does not seem to be uploading coverage at all: https://github.com/python-pillow/Pillow/actions/runs/4153272820/jobs/7184796519#step:15:26

[2023-02-11T22:28:10.252Z] ['error'] There was an error running the uploader: Error fetching git root. Please try using the -R flag. Error: Error running external program: Error: spawnSync git ENOENT

add gcov coverage to test.yml
@hugovk hugovk changed the title Docker tests: enable gcov support for codecov/codecov-action Enable gcov support for codecov/codecov-action Feb 12, 2023
@hugovk
Copy link
Member Author

hugovk commented Feb 12, 2023

Good stuff, thank you!

@hugovk
Copy link
Member Author

hugovk commented Feb 12, 2023

And please could you report the MSYS2 error to https://github.com/codecov/codecov-action? Looks like the Action needs to call their uploader client differently in this case.

@radarhere radarhere merged commit 228709e into python-pillow:main Feb 14, 2023
@hugovk hugovk deleted the fix-codecov-docker branch February 14, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants